﻿using System.ComponentModel.DataAnnotations;

namespace ITTestingSystem.Domain.Entities
{
    /// <summary>
    /// Specifies information about completed test
    /// </summary>
    /// 
    public class CompletedTestsDetail
    {
        /// <summary>
        /// Returns the primary key for entity in database table
        /// </summary>
        /// 
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// Returns unique identifier for completed test in the database table
        /// </summary>
        /// 
        [Required]
        public int TestId { get; set; }

        /// <summary>
        /// Returns unique identifier for user in the database table that had completed test
        /// </summary>
        /// 
        [Required]
        public int UserId { get; set; }

        /// <summary>
        /// Returns user's score
        /// </summary>
        /// 
        [Required]
        public int Score { get; set; }

        /// <summary>
        /// Time that user had spent
        /// </summary>
        /// 
        [Required]
        public int SpendTime { get; set; }




        /// <summary>
        /// Returns the users entity that had completed test
        /// </summary>
        /// 
        public virtual User User { get; set; }

        /// <summary>
        /// Returns the completed test
        /// </summary>
        /// 
        public virtual Test Test { get; set; }
    }
}
